//GameHUD.h
//Created 19/05/14
//Created By HarryStephenson
//
//This class represents the the game HUD and will display the players
//health and other data relevent to the the player.

#pragma once

#include "FontSheet.h"
#include "SpriteBatch.h"
#include "Player.h"

// Forward declare the graphic interface
class GraphicInterface;

// The number for how many images should be loaded into our
// array of 2D images (1 player health unit = 1 health display)
#define NUM_HEALTH_SEGMENTS 6

class GameHUD
{
public:
	// constructor/destructor
	GameHUD();
	~GameHUD();

	// Update and init methods for the game HUD
	void RenderHUD(GraphicsInterface* gi, Player* player);
	void Initalise(ID3D11Device* device);
	void Update(float delta);
	
	// Called in game scene to toggle between HUD up or HUD down
	bool GetIsActive() {return isActive;};
	void SetIsActive(bool active);

	// Gives the abilty to set how many medals and collectables have been collected
	// so we can output these to the HUD.
	void SetNumMedals(int medals);
	void SetNumCollectables(int collectables);

private:
	bool isActive;
	// Stores for the number of collectables and medals so we can output
	// the number to screen when rendering the hud.
	int numCollectables;
	int numMedals;

	// 2D Rendering
	FontSheet* font;
	SpriteBatch* spriteBatch;

	// Pointer for each image to be loaded
	ID3D11ShaderResourceView* healthImages[NUM_HEALTH_SEGMENTS];
	ID3D11ShaderResourceView* orbImage;
	ID3D11ShaderResourceView* medalImage;
};